<%@ page import="java.util.List" %>
<%@ page import="com.aimee.entity.Lunbo" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="../layui/css/layui.css">
</head>

<body>
<%
    List<Lunbo> list = (List) request.getAttribute("adverlistaddress");
%>
    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
        <legend>最新公告</legend>
    </fieldset>
    <div class="layui-carousel" id="test1" lay-filter="test1" style="margin:0 auto;">
        <div carousel-item="">
   <%--         <div><img src="../advertise/2.jpg"></div>
            <div><img src="../advertise/3.jpg"></div>
            <div><img src="../advertise/4.jpg"></div>
            <div><img src="../advertise/5.jpg"></div>--%>
              <c:forEach items="${adverlistaddress}" var="address">
<%--                  ${address.advertise_address}--%>
                  <div><img src="../advertise/${address.advertise_address}"></div>
              </c:forEach>
        </div>
    </div>
</body>
<script src="../layui/layui.js"></script>
<script>
    layui.use(['carousel', 'form'], function () {
        var carousel = layui.carousel,
            form = layui.form;

        //常规轮播
        carousel.render({
            elem: '#test1',
            arrow: 'always',
            width: '700px',height: '320px',
            interval: 2000
        });
    });
</script>

</html>